package com.pur.zsms.querycode.service.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.role.dao.IRoleDao;
import com.pur.zsms.pmsnmanage.role.po.RolePo;
import com.pur.zsms.pmsnmanage.role.vo.RoleVo;
import com.pur.zsms.pmsnmanage.user.dao.IUserDao;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.po.UserRolePo;
import com.pur.zsms.pmsnmanage.user.service.IUserService;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.querycode.dao.IQueryCodeDao;
import com.pur.zsms.querycode.service.IQueryCodeService;
import com.pur.zsms.systemsetting.datadictionary.po.Code;

@Service("queryCodeService")
public class QueryCodeServiceImpl implements IQueryCodeService {

	@Resource(name = "queryCodeDao")
	private IQueryCodeDao queryCodeDaoImpl;
	
	
	public IQueryCodeDao getQueryCodeDaoImpl() {
		return queryCodeDaoImpl;
	}


	public void setQueryCodeDaoImpl(IQueryCodeDao queryCodeDaoImpl) {
		this.queryCodeDaoImpl = queryCodeDaoImpl;
	}


	public List<Code> listCodeByCodeTypeId(String codeTypeId)
			throws GenericException {
		if(StringUtils.isBlank(codeTypeId)){
			throw new RuntimeException("类型为空，无法查询出结果！");
		}
		return queryCodeDaoImpl.listCodeByCodeTypeId(codeTypeId);
 	}
}
